home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 47.7z / BS1 part 47 / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].7z / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].adf / piarc.lzh.parta / imopal.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-17  |  3KB  |  128 lines

  1. /*
  2.  * imopal.rexx
  3.  *
  4.  *  Written by: Black Belt Systems  Technical Development
  5.  * Last Update: March 15th, 1993
  6.  *    Revision: 1.00
  7.  *         For: Black Belt Systems image processing series IM, IM F/c, and IP.
  8.  *
  9.  * Modifications:
  10.  *        1.00  15 Mar 1992     Initial release.
  11.  *
  12.  */
  13.  
  14.  def_pal      = 0;  /* 0 = NTSC,  1 = PAL   !!! CHANGE THIS FOR PAL */
  15. /*
  16.  * Default display modes   - These are used when this is called with
  17.  *                           selective redraw parameters
  18.  */
  19.  def_hires    = 1;  /* 0 = lo    1 = hi-res                         */
  20.  def_lace     = 1;  /* 0 = non-lace, 1 = lace                       */
  21.  def_overscan = 0;  /* 0 = normal, 1 = overscan                     */
  22.  def_scaled   = 1;  /* 0 = EXACT,  1 = SCALED                       */
  23.  
  24. parse arg jackin dx1 dy1 dx2 dy2
  25.  
  26. call pragma('stack',20000);
  27.  
  28. if jackin = 'finish' then do
  29.   exit 0;
  30.   end;
  31.  
  32. /* We turn selective redraw OFF for now */
  33. dx1 = 0;
  34. dx2 = 0;
  35. dy1 = 0;
  36. dy2 = 0;
  37.  
  38. /*
  39.  * open rexxsupport.library -- needed for some functions
  40.  */
  41. if ~show('L',"rexxsupport.library") then do
  42.   if addlib('rexxsupport.library',0,-30,0) then do
  43.       /* everything's ok */
  44.     end;
  45.   else do
  46.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  47.     say 'Cannot operate script without this library - sorry!';
  48.     exit 10;
  49.     end;
  50.   end;
  51.  
  52. /*
  53.  * This will automatically direct the script to the proper
  54.  * software, if it is running.
  55.  */
  56. prtnme = 'IM_Port'; /* assume Image Professional */
  57.  
  58.   /*
  59.    * This code attempts to read a file called "picmdpath" from REXX:
  60.    * If it can't find it, the script will assume that the commands
  61.    * associated with this PI Module are in "c:". If the file exists,
  62.    * the script will look in the path that is specified in the file.
  63.    * If you create this file, you MUST put a complete, correct path
  64.    * in it; if the commands are in a sub-directory, you have to put
  65.    * the trailing slash on the path (like, device:dir/).
  66.    * 
  67.    */
  68.   cmdpath = 'c:';
  69.   if open(fhandle,'rexx:picmdpath','read') then  /* open the file */
  70.     do
  71.       cmdpath = readln(fhandle);
  72.       call close(fhandle);  /* close the file    */
  73.     end
  74.  
  75. address(prtnme);
  76.  
  77. if jackin > 0 then do
  78.   hires     = def_hires;
  79.   lace      = def_lace;
  80.   overscan  = def_overscan;
  81.   pal       = def_pal;
  82.   scaled    = def_scaled;
  83. end;
  84. else do
  85.   pal       = def_pal;
  86.   
  87.   options results;
  88.   'askyn "Lo-Res","Hi-Res"';
  89.   hires = result;
  90.   options;
  91.   
  92.   options results;
  93.   'askyn "Non-Lace","InterLace"';
  94.   lace = result;
  95.   options;
  96.   
  97.   options results;
  98.   'askyn "Display Non- Overscan","Display Overscan"';
  99.   overscan = result;
  100.   options;
  101.   
  102.   options results;
  103.   'askyn "Pixel Exact","Scaled"';
  104.   scaled = result;
  105.   options;
  106.   
  107.   
  108.   options results;
  109.   'jackin';
  110.   jackin = result;
  111.   options;
  112. end;
  113.  
  114.  
  115. /* USAGE for the IMopal program is                             */
  116. /*      IMopal <jackin> [hires] [lace] [overscan] [pal] [scale] [dx1] [dy1] [dx2] [dy2] */
  117. /* Default is                                                  */
  118. /*      IMopal    -        1        1      0       */  
  119.  
  120. address command cmdpath||'imopal '||jackin||' '||hires||' '||lace||' '||overscan||' '||pal||' '||scaled||' '||dx1||' '||dy1||' '||dx2||' '||dy2;
  121. address(prtnme);
  122.  
  123. 'tofront';
  124. 'finish';
  125. address;
  126.  
  127. exit 0;
  128.